import Vue from 'vue';
import Vuex from 'vuex';
import defaultState from '@/store/state/state';
import mutations from '@/store/mutations/mutations';
import getters from '@/store/getters/getters';
import actions from '@/store/actions/actions';

const isDev = process.env.NODE_ENV === 'development';
Vue.use(Vuex);
export default new Vuex.Store({
  strict: isDev,
  state: [defaultState],
  // mutations用于同步修改数据
  mutations,
  getters,
  actions
});
